import java.lang.Throwable;

public class Test6 {
    public static void main(String[] args) throws Exception {
        int[] arr = new int[]{1,2,3,4,5,6,7,8,9,10};

        try {
            for (int i = 0; i <= arr.length; i++) {
                System.out.println(arr[i]);
            }
        } catch (ArrayIndexOutOfBoundsException e) {
            e.printStackTrace();
        }
    }
}
